{include 'header.tpl'}
<link href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
<style>
    .fixednav { position: fixed; top: 0px; left: 0px; width: 100%; background-color: #fcfcfc; border-bottom: #7F7F7F; }
    .swiper-container { width: 100%; height: 100%; margin-left: auto; margin-right: auto; }

    .swiper-slide {
        text-align: center;
        font-size: 18px;
        background: #fff;

        /* Center slide text vertically */
        display: -webkit-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
    .swiper-pagination-bullet-active{ background-color: #FF6600;}
    .swiper-slide img { height: auto; width: auto\9; width: 100%; }
</style>

<div class="contant">

    <div class="header">
        <div class="header_s">
            <span class="back"><a href="/"><i class="iconfont fan">&#xe679;</i></a></span>
            <span class="title">{$info.title}</span><span class="add_ads">&nbsp;</span>
            <div class="clear"></div>
        </div>
    </div>

    <div class="mail_prd_tp">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                {foreach from=$info.img1 item=item name=foo}
                    <div class="swiper-slide">
                        <img width="100%" height="100%" data-src="{$item}" class="swiper-lazy"/>
                        <div class="swiper-lazy-preloader" style="margin-top:170px;"></div>
                    </div>
                {/foreach}
            </div>
            <div class="swiper-pagination"></div>
        </div>
        {*<img src="{$info.img2}"/>*}
    </div>
    <!--基本信息-->
    <div class="info_basic">
        <div class="basic_title">
            <div class="basic_tlt">{$info.title}</div>
            <div class="basic_fx" data-count="{$info.productList|count}" data-cover="{$info.img2}"
                 data-cs_num="{$info.cs_num}" data-pid="{$info.pid}" data-title="{{$info.title}}" data-product='{$info.productList|json_encode}'>
                <a href="javascript:;"><div class="add_gou2">+</div></a>
            </div>
        </div>
        <div class="price">
            <span class="price_jg_s">夏季专享价：<em>￥{Service_Goods::moneyReZero($info.price_new)}</em></span>
            <span class="price_yj">原价{Service_Goods::moneyReZero($info.price_old)}</span>
            <span class="price_rs">{$info.paynum}人已购买</span>
        </div>
    </div>

    <div class="basic_xqs">
        <div class="xqs_tlt">商品简介</div>
        <div class="qstlt_sm">{$info.resume}</div>
    </div>

    <div class="basic_xqs">
        <div class="xqs_tlt">商品详情</div>
        <div class="qstlt_sm">{$info.details}</div>
    </div>
    <div class="fixed_btom">
        <div class="fixed_btoms">
            <div class="fixed_cart_lf">
                <span><a onClick="$('#cartOne').show()" class="fix_rg_gw"><img src="/mall/images/3_2.png"/><div class="shot_n_i3">{$cart_list_count}</div></a></span>
                <div class="cart_jse"><div class="cart_jgb_t">赶紧加入购物车</div></div>
            </div>
            <div class="fixed_cart_rg">
                {if $cart_list_price >= 35}
                    <a href="/order/submit" class="fix_rg_dg_ok">结算</a>
                {else}
                    <a href="javascript:;" class="fix_rg_dg">还差{$cart_list_price_sx}元起送</a>
                {/if}
            </div>
        </div>
    </div>
</div>

{include 'cart.tpl'}

<script src="https://cdn.bootcss.com/Swiper/3.4.2/js/swiper.min.js"></script>
{*<script type="text/javascript" src="/js/swiper.min.js"></script>*}
<script type="text/javascript" language="JavaScript">
    $(function () {
        $(document).on('click', '.basic_fx', function () {
            var count = $(this).data('count');
            if (count > 1) {
                var cart = new Cart($(this), function (pid, num) {
                    addCart(pid, num);
                    $.toast('加入购物车成功！');
                });
                cart.create();
            } else {
                var pid = $(this).data('pid');
                addCart(pid, 1);
                $.toast('加入购物车成功！');
            }
        });

        var swiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            paginationClickable: true,
            lazyLoading: true,
            onInit: function (swiper) {
            },
            onSlideChangeStart: function () {
            }
        });
    })
</script>

{include 'footer.tpl'}
